<nav class="mb-6" aria-label="Secondary sidebar nav">
  <% if user_signed_in? %>
    <header class="pt-2 pl-3 pb-0 pr-0 flex items-center justify-between">
      <h2 class="crayons-subtitle-3"><%= t("views.main.tags.my_tags") %></h2>
      <a id="tag-priority-link" href="<%= dashboard_following_tags_path %>" class="c-link c-link--block c-link--icon-alone" aria-label="<%= t("views.main.tags.aria_label") %>" title="<%= t("views.main.tags.aria_label") %>">
        <%= crayons_icon_tag(:cog) %>
      </a>
    </header>
    <div id="sidebar-nav-followed-tags" class="overflow-y-auto -m-1 p-1 mb-2 sidebar-nav-followed-tags" style="max-height: 42vh;"></div>
  <% else %>
    <% tags = Tag.from_subforem.order(hotness_score: :desc).limit(30).pluck(:id, :name) %>
    <% if tags.any? %>
      <h3 class="crayons-subtitle-3 p-2"><%= t("views.main.tags.popular_tags") %></h3>
      <div id="sidebar-nav-default-tags" class="overflow-y-auto" style="max-height: 42vh">
        <% tags.each do |tag_array| %>
          <div class="sidebar-nav-element" id="default-sidebar-element-<%= tag_array.second %>">
            <a class="c-link c-link--block" href="<%= tag_path(tag_array.second) %>">
              #<%= tag_array.second %>
            </a>
          </div>
        <% end %>
      </div>
    <% end %>
  <% end %>
</nav>
